import org.molamil.acto.pages.history.HistoryManager;
import org.molamil.acto.pages.master.MovieMaster;
import org.molamil.acto.pages.master.PageMaster;

/**
 * Page controller definition.
 *
 * @author Jorge Hernandez
 */
interface org.molamil.acto.pages.controller.PagesController extends HistoryManager {
	
	/**
	 * Displays a specific page by name, taking out the page currently
	 * displayed.
	 *
	 * @param   name Name of the page.
	 * @param   params Object containing parameters for the page.	 * @return  The created <code>PageMaster<code>.
	 */
	function goto(name:String, params:Object):PageMaster;
	
	/**
	 * Takes out the page currently displayed and displays it again
	 * right after.
	 */
	function reloadPage():Void;
	
	/**
	 * Checks that the page exists.
	 * 
	 * @param   name Name of the page.
	 * @return  Whether the page exists or not.
	 */
	function containsPage(name:String):Boolean;
	
	/**
	 * Gets the page currently displayed.
	 * 
	 * @return  Page currently displayed, or <code>null</code> if not.
	 */
	function getDisplayedPage():PageMaster;
		function getCurrentPage():PageMaster;
	
	function displayMovie(name:String, params:Object):MovieMaster;
	
	function displayMovieForPage(name:String, params:Object):MovieMaster;
		function clearMovie(name:String):Void;
	
	function getDisplayedMovie(name:String):MovieMaster;
		function getDisplayedMovies():Array;
		function isDisplayedMovie(name:String):Boolean;
	
	
}